package com.sebiotec.manager.net;


import com.sebiotec.manager.model.SearchEntrty;
import com.sebiotec.manager.model.response.AddNocationResponse;
import com.sebiotec.manager.model.response.DashboardResponse;
import com.sebiotec.manager.model.response.LocationsResponse;
import com.sebiotec.manager.model.response.MessListResponse;
import com.sebiotec.manager.model.response.MessageDetailResponse;
import com.sebiotec.manager.model.response.UseProfileResponse;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.HeaderMap;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Path;

public interface BookAPi {




    //获取首页数据
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST(" api/Managers/Dashboard")
    Observable<DashboardResponse> getDashboard (@HeaderMap Map<String, Object> headers, @Body RequestBody body);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST(" /api/Logout")
    Observable<ResponseBody>  LoginOut(@HeaderMap Map<String, Object> headers);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/api/FCMToken")
    Observable<ResponseBody>FCMToken(@HeaderMap Map<String, Object> headers);



    //分类数据

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/api/Managers/SearchBookings")
    Observable<SearchEntrty> getSearchBookings(@HeaderMap Map<String, Object> headers, @Body RequestBody body);


    //地点 Locations
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/SearchLocations")
    Observable<List<LocationsResponse>> getLocations(@HeaderMap Map<String, Object> headers, @Body RequestBody body);


    //地点 Charged Type

    @GET("/api/ChargedTypes")
    Observable<List<LocationsResponse>> getChargedType(@HeaderMap Map<String, Object> headers);

    @GET("/api/Bookers")
    Observable<List<AddNocationResponse>> getAddNotication(@HeaderMap Map<String, Object> headers);
    //地点 Charged Type

    @GET("/api/VehicleTypes")
    Observable<List<LocationsResponse>> getVehicleType(@HeaderMap Map<String, Object> headers);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/api/Bookings ")
    Observable<ResponseBody> ADDBookings(@HeaderMap Map<String, Object> headers, @Body RequestBody body);


    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/api/Managers/SearchBookingHistory")
    Observable<SearchEntrty> getHistoryBookings(@HeaderMap Map<String, Object> headers, @Body RequestBody body);



    @GET("/api/Users/{LoginId}")
    Observable<UseProfileResponse> getUser(@HeaderMap Map<String, Object> headers, @Path("LoginId") String LoginId);



    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/api/Users/{LoginId}")
    Observable<ResponseBody> EditTextUser(@HeaderMap Map<String, Object> headers, @Path("LoginId") String LoginId, @Body RequestBody body);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/api/Users/Password/{LoginId}")
    Observable<ResponseBody> EditPwd(@HeaderMap Map<String, Object> headers, @Path("LoginId") String LoginId, @Body RequestBody body);


    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/api/SearchMessage")
    Observable<MessListResponse> MessageList(@HeaderMap Map<String, Object> headers, @Body RequestBody body);



    //已读https://localhost:5330/api/Messages/{Id}
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/api/Messages/{Id}")
    Observable<ResponseBody> isRead(@HeaderMap Map<String, Object> headers, @Path("Id") String Id, @Body RequestBody body);




    @GET("/api/Messages/{BookingId}")
    Observable<MessageDetailResponse> getMessageDetail(@HeaderMap Map<String, Object> headers, @Path("BookingId") String BookingId);

    @GET("/Managers/{BookingId}")
    Observable<MessageDetailResponse> getBookDetail(@HeaderMap Map<String, Object> headers, @Path("BookingId") String BookingId);


    //设置mark/api/Managers/Bookmark/{BookinId}
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("/api/Managers/Bookmark/{BookinId}")
    Observable<ResponseBody> Bookmark(@HeaderMap Map<String, Object> headers, @Path("BookinId") String BookinId, @Body RequestBody body);





}
